home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Broadcaster
/
BroadcastLoop.h
< prev
next >
Wrap
Text File
|
2000-06-23
|
989b
|
41 lines
// BroadcastLoop.h
#ifndef BroadcastLoop_h
#define BroadcastLoop_h
#ifndef ListLoop_h
#include "ListLoop.h"
#endif
#ifndef Broadcaster_h
#include "Broadcaster.h"
#endif
template < class Protocol >
class BroadcastLoop: private ListLoop< Protocol >
{
private:
typedef ListLoop< Protocol > Inherited;
public:
BroadcastLoop( const Broadcaster<Protocol>& source )
: ListLoop< Protocol >( source.receivers )
{}
void operator++() { this->Inherited::operator++(); }
void operator++(int) { this->Inherited::operator++(); }
// Access declarations are broken in templates in CW Pro 5
//Inherited::Finished;
//Inherited::Unfinished;
//Inherited::operator*;
//Inherited::operator->;
bool Finished() const { return Inherited::Finished(); }
bool Unfinished() const { return Inherited::Unfinished(); }
Protocol& operator*() const { return Inherited::operator*(); }
Protocol *operator->() const { return Inherited::operator->(); }
};
#endif